<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.phpobjectgenerator.com/plog/rss/"/>
<link rel="stylesheet" href="./code_generator_primer.css" type="text/css" />
<title>PHP Code Generator</title>
<meta name="description" content="Php Object Generator, (POG) is a PHP code generator which automatically generates tested Object Oriented code that you can use for your PHP4/PHP5 application.  " />
<meta name="keywords" content="php, code, generator, classes, object-oriented, CRUD" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="./pog.js" type="text/javascript">
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-72762-1";
urchinTracker();
</script>
</head>
<body class="primer">
<div class="main">
	<div class="left">

	</div><!-- left -->

	<div class="middle">
<h1>Code Generator</h1>
	<h2>PHP Object Generator</h2><p>POG (<a href="http://www.phpobjectgenerator.com" title="php object generator"><i>PHP Object Generator</i></a>) saves the PHP developer time by generating tested and efficient PHP Objects. The programming pattern behind POG is <i>Object-Relational Mapping</i> also known as <i>Active Record</i> or <i>Persistence Layer</i>. Above all else, the generated code has been designed to be extremely clean, easy to understand and use.</p>

<p>Put simply, whenever you're programming with PHP and a database, POG will help accelerate your development. POG generates PHP classes which map to tables in your database. The database used can be any one of the following: MySQL, <del>Firebird, SQL Server, SQLite, PostgreSQL.</del></p>

<h3>Accelerating Development</h3>
<p><b>Simple &amp; Useful</b><br/>The PHP classes generated by POG have 5 public methods which allow you to perform atomic database operations using the objects. These are often referred to as CRUD operations (CREATE, RETRIEVE, UPDATE and DELETE). The 5 methods generated by POG are named: Save, SaveNew, Get, GetList and Delete.</p>

<p>For example, if you generate a 'user' class with 'firstName' and 'lastName' attributes, calling the Save function like so</p>
<p class="indent">$user -> firstName = "John";<br/>$user -> lastName = "Smith";<br/>$user -> Save();</p> <p>will simply insert the value "John" in the "firstname" column in the "user" table. Similarly, the value "Smith" is placed in the "lastname" column.</p>

<p>So in effect, POG is saving you time because you don't have to write any SQL queries to do simple operations such as Inserts, Retrieve etc. Using objects to represent database tables is a very popular programming pattern known as "object-relational mapping". In the Ruby programming world, it is known specifically as ActiveRecord whereas in the Java world, it's often referred to as a "persistence layer".</p>

<h3>Background</h3>
<p><b>Origin</b><br/>PHP Object Generator was created simply because there is a lack of good PHP code generators on the internet. Development efforts by other individuals or groups seem to be focused mostly on creating PHP frameworks whereas we focus on making the best code generator possible. </p>


<h3>Intended Audience</h3>
<p><span class="grey">Code generation has long been and is still a dividing issue among programmers</span>. On one side there are those who embrace it, and on the other, those who disdain it. The problem has so far been that authors of code generators have either tried to do too much, or hyped their products beyond their actual capabilities.</p>

<p>On our side, we're trying to solve a very specific issue: Focus on making the best generator of PHP objects with integrated CRUD methods. We don't claim that POG will generate your entire web application for you. However, we are very confident POG will help you get started faster and make your web application easier to maintain in the long run. We've chosen this particular programming design pattern (ORM) because it is a very simple concept to grasp and fits very well with PHP database programming. It is however not as widespread as it should be simply because many new developers haven't been introduced to the ORM pattern yet.</p>



<h3>More Information</h3>
<p><b>Video example</b><br/>If you're interested to see <i>PHP Object Generator</i> in action, download this <a href="http://www.phpobjectgenerator.com/plog/file_download/9" title="Introductory video">4 min introductory video</a></p>
<p><b>Do-it-yourself</b><br/>Give <a href="http://www.phpobjectgenerator.com" title="PHP Object Generator"><i>PHP Object Generator</i></a> and see for yourself what code generation is all about</p>


	</div><!-- middle -->
	<div class="right" style="padding-left:100px;">
		<script type="text/javascript"><!--
google_ad_client = "pub-7832108692498114";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_cpa_choice = "CAEaCD6CK5N5V0NTUAVQA1AIUEM";
google_ad_channel = "6934687074";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_text = "333333";
google_color_url = "0000FF";
//-->
</script>
<script type="text/javascript"><!--
google_ad_client = "pub-7832108692498114";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_cpa_choice = "CAEaCDFo_JLOUFdYUC9QNFAS";
google_ad_channel = "7811436112";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_text = "333333";
google_color_url = "0000FF";
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
	</div>
</div><!-- main -->
</body>
</html>